package cn.bdqn.util;

import java.util.List;

public class Page<T> {
	private Integer	pageNo;
	private Integer	pageSize;
	private Integer totalCount;
	private Integer totalPageCount;
	private Integer start;
	private List<T> list;
	public final Integer getPageNo() {
		return pageNo;
	}
	public final void setPageNo(Integer pageNo) {
		this.pageNo = pageNo;
		this.start=(pageNo-1)*pageSize;
	}
	public final Integer getPageSize() {
		return pageSize;
	}
	public final void setPageSize(Integer pageSize) {
		this.pageSize = pageSize;
	}
	public final Integer getTotalCount() {
		return totalCount;
	}
	public final void setTotalCount(Integer totalCount) {
		this.totalCount = totalCount;
		if(totalCount%pageSize==0) {
			this.totalPageCount=totalCount/pageSize;
		}else {
			this.totalPageCount=(totalCount/pageSize)+1;
		}
	}
	public final Integer getTotalPageCount() {
		return totalPageCount;
	}
	public final void setTotalPageCount(Integer totalPageCount) {
		this.totalPageCount = totalPageCount;
	}
	public final Integer getStart() {
		return start;
	}
	public final void setStart(Integer start) {
		this.start = start;
	}
	public final List<T> getList() {
		return list;
	}
	public final void setList(List<T> list) {
		this.list = list;
	}
	
}
